﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ByteSite.WinClient.Common
{
    public static class ScreenHelper
    {
        public static void Save(string path)
        {
            int width = Screen.PrimaryScreen.Bounds.Width;
            int height = Screen.PrimaryScreen.Bounds.Height;
            Bitmap b = new Bitmap(width, height);
            Graphics g = Graphics.FromImage(b);
            g.CopyFromScreen(0, 0, 0, 0, new Size(width, height));
            FileHelper.DirectoryCreate(path.Substring(0, path.LastIndexOf("/")));
            b.Save(path);
            //Clipboard.SetImage(b);
        }
    }
}
